Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compatible with qq browser on ios, close #294 #366

Closed
wants to merge 1 commit into from

Conversation

markthree
Copy link

@markthree markthree commented Feb 27, 2024

πŸ”— Linked issue

#294

nuxt/nuxt/issues/25956

nuxt/nuxt/issues/24229

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This doesn't look perfect, but after manual testing, everything runs smoothly and there are no break change.

The reason may be that the core used by these browsers has not yet implemented response.body 🀣

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe requested a review from pi0 March 3, 2024 21:29
Copy link

codecov bot commented Mar 3, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 59.30%. Comparing base (244fb6a) to head (6da36df).
Report is 54 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
+ Coverage   56.86%   59.30%   +2.43%     
==========================================
  Files          16       16              
  Lines         728      747      +19     
  Branches      113      162      +49     
==========================================
+ Hits          414      443      +29     
+ Misses        303      293      -10     
  Partials       11       11              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@pi0
Copy link
Member

pi0 commented Mar 4, 2024

Thanks for the PR. I would love to have further investigation before merging this (otherwise ofetch ends up with lots of old browser compatibility fixes)

Do you mind to make a minimal testing environment (html+js) and share the browser version/platform required to verify.

@markthree
Copy link
Author

markthree commented Mar 4, 2024

Dear @pi0,I apologize, but I am unable to provide a reproducible test case.

On one hand, it only occurs in the QQ Browser on iOS, and I am not very clear about the WebKit version being used (my phone is running iOS 17).Β 

Also, I am not very familiar with testing on old browsers, so I apologize for not being able to provide a shareable test environment. 😭

@pi0
Copy link
Member

pi0 commented Mar 4, 2024

Okay, no worries. I will try to assemble a reproduction env once could but it is essential before we can move it forward I hope it is reasonable.

@pi0 pi0 marked this pull request as draft March 4, 2024 15:58
@markthree
Copy link
Author

markthree commented Mar 5, 2024

Okay, no worries. I will try to assemble a reproduction env once could but it is essential before we can move it forward I hope it is reasonable.

Thank you πŸ₯°

@zhangjunjie6b

This comment was marked as off-topic.

@markthree
Copy link
Author

If someone doesn't have high stability requirements, they can use this module β†’ markthree/nuxt-fix-ofetch

@pi0
Copy link
Member

pi0 commented Jun 17, 2024

Seems to be fixed in the latest QQ browser @markthree can you confirm?

#294 (comment)

@pi0 pi0 closed this Jun 17, 2024
@markthree
Copy link
Author

Seems to be fixed in the latest QQ browser @markthree can you confirm?

#294 (comment)

Yes, the problem still exists, it's a problem with ofetch, and it can be reproduced when using it solely

@pi0
Copy link
Member

pi0 commented Jun 17, 2024

From @xjccc comment:

now..
QQ version: 15.1.6.5925
UC version: 16.5.5.2341
works fine

But you have issue with these versions and ofetch?

@markthree
Copy link
Author

From @xjccc comment:

now..
QQ version: 15.1.6.5925
UC version: 16.5.5.2341
works fine

But you have issue with these versions and ofetch?

yes, QQ Browser version: 15.1.7

@markthree
Copy link
Author

Thanks to the onResponse option, I'm now using it to hack in my production environment, and so far I've found no problems! 🀣

ref β†’ nuxt-fix-ofetch/src/runtime/00.fetch.client.ts#L52-#L86

@pi0 pi0 reopened this Jun 17, 2024
@xjccc
Copy link

xjccc commented Jun 17, 2024

I upgrade my QQ Browser version: 15.1.7.5928

iOS version: 17.5.1


  • Operating System: Darwin
  • Node Version: v20.10.0
  • Nuxt Version: 3.12.2
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.15.4

my web site works fine..

@pi0
Copy link
Member

pi0 commented Oct 8, 2024

Hi dear @markthree Again sorry this took long.

We have merged a relative fix in #398 that passes _bodyInit directly as _data.

I think we might add an improvement to check if body is blob, use .stream()

@pi0 pi0 closed this Oct 8, 2024
@markthree
Copy link
Author

Hi dear @markthree Again sorry this took long.

We have merged a relative fix in #398 that passes _bodyInit directly as _data.

I think we might add an improvement to check if body is blob, use .stream()

Thanks @pi0, looks great, ofetch is much easier to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants